﻿using System;
using System.Linq;
using System.ServiceModel;

namespace BigMailer.Services
{
	[ServiceContract]
	public interface IMailerService
	{
		[OperationContract]
	//	[FaultContract( typeof( AuthenticationException ) )]
		void BeginUpload(string file, string authToken);

		[OperationContract]
	//	[FaultContract( typeof( AuthenticationException ) )]
		void AddFilePart(string file, byte[] parts, string authToken);

		[OperationContract]
	//	[FaultContract( typeof( AuthenticationException ) )]
		string CloseFileAndGetUrl(string file, string authToken);

		[OperationContract]
	//	[FaultContract( typeof( AuthenticationException ) )]
		void AbandonFile(string file, string authToken);

		[OperationContract]
		void Ping();

		[OperationContract]
	//	[FaultContract( typeof( AuthenticationException ) )]
		ExistingFile[] GetPreexistingFiles(string authToken);

		[OperationContract]
	//	[FaultContract( typeof( AuthenticationException ) )]
		ExistingFile[] GetDiscoverableFiles(string authToken);

		[OperationContract]
	//	[FaultContract( typeof( AuthenticationException ) )]
		string Authenticate(string user, string password);

		[OperationContract]
	//	[FaultContract( typeof( AuthenticationException ) )]
		void MakeFileDiscoverable(string file, string authToken);

		[OperationContract]
	//	[FaultContract( typeof( AuthenticationException ) )]
		void MakeFileUndiscoverable(string file, string authToken);
	}
}